package concurrent.completableFuture;

import com.alibaba.fastjson.JSON;

import java.util.concurrent.TimeUnit;

/**
 * @author LoneRanger
 * @version 1.0
 */
public class SendMessageService {

	public boolean send(UserInfo userInfo, MedalInfo medalInfo) {
		System.out.println("开始send：user=" + JSON.toJSONString(userInfo) + ",medal=" + JSON.toJSONString(medalInfo));
		try {
			TimeUnit.SECONDS.sleep(3);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(Thread.currentThread().getName() + "-发送成功");
		return true;
	}

}
